import { http } from "@/utils/http";
import { baseUrlApi } from "../utils";

/** 获取基础档案-商品类目管理列表 */
export const getProductPage = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/category/page"), { params });
};

/** 基础档案--商品类目管理列表-新增 */
export const productAdd = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/category/add"), { data });
};

/** 基础档案--商品类目管理列表-编辑 */
export const productUpdate = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/category/update"), { data });
};

/** 基础档案--商品类目管理列表-删除 */
export const productDelete = (id?: object) => {
  return http.request<any>("post", baseUrlApi(`/category/delete?id=${id}`));
};
